import Vue from 'vue'
import Router from 'vue-router'
import main from '@/components/main'
import mainPage from '@/components/mainPage/mainPage'
import businessClass from '@/components/mainPage/businessClass'
import contact from '@/components/mainPage/contact'
import download from '@/components/mainPage/download'
import buy from '@/components/buy/buy'
import rent from '@/components/rent/rent'
import buyDetails from '@/components/buy/buyDetails'
import rentDetails from '@/components/rent/rentDetails'
import devDetails from '@/components/newdevelopment/devDetails'
import hostelDetails from '@/components/hostel/hostelDetails'
import hostel from '@/components/hostel/hostel'
import newDevelopment from '@/components/newDevelopment/newDevelopment'
import Login from '@/components/login'
import Register from '@/components/register'
import ResetPassword from '@/components/resetPassword'
import ConfirmRegisterEmail from '@/components/confirmRegisterEmail'
import ConfirmEmailPassword from '@/components/confirmEmailPassword'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'main',
      component: main,
      redirect: '/mainPage',
      children: [
        {path: '/mainPage', component: mainPage, name: 'mainPage', hidden: true},
        {path: '/buy', component: buy, name: 'buy', hidden: true},
        {path: '/download', component: download, name: 'download', hidden: true},
        {path: '/businessClass', component: businessClass, name: 'businessClass', hidden: true},
        {path: '/contact', component: contact, name: 'contact', hidden: true},
        {path: '/rent', component: rent, name: 'rent', hidden: true},
        {path: '/buyDetails', name: 'buyDetails', component: buyDetails, hidden: true},
        {path: '/rentDetails', name: 'rentDetails', component: rentDetails, hidden: true},
        {path: '/devDetails', name: 'devDetails', component: devDetails, hidden: true},
        {path: '/hostelDetails', name: 'hostelDetails', component: hostelDetails, hidden: true},
        {path: '/hostel', name: 'hostel', component: hostel, hidden: true},
        {path: '/newDevelopment', name: 'newDevelopment', component: newDevelopment, hidden: true},
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/resetPassword',
      name: 'resetPassword',
      component: ResetPassword
    },
    {
      path: '/confirmRegisterEmail',
      name: 'confirmRegisterEmail',
      component: ConfirmRegisterEmail
    },
    {
      path: '/confirmEmailPassword',
      name: 'confirmEmailPassword',
      component: ConfirmEmailPassword
    },
  ]
})
